package com.atguigu.eduservice.controller;

import com.atguigu.commonutils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin //解决跨域问题
@Api(value = "模拟登录", tags = "讲师管理接口")
public class EduLoginController {
    //login
    @PostMapping("login")
    public R Login() {
        return R.ok().data("token","admin");

    }

    //info 用户数据
    @GetMapping("info")
    public R info() {
        return R.ok()
                .data("roles","[admin]")
                .data("name","admin")
                .data("avatar","https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F9c83df516f73065b44fbd94086009dc041af036bdd92-WoBejc_fw658&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1632570012&t=6edec08226cde6e0f81f3764c7a7e6e7");
    }



}
